<?php 
/**
 * 我的素材
 * 
 */
require_once(dirname(__FILE__)."/config.php");
require_once(DEDEINC."/datalistcp.class.php");
CheckRank(0,0);
$menutype = 'sucai';
setcookie("ENV_GOBACK_URL",GetCurUrl(),time()+3600,"/");
if(!isset($dopost)) $dopost = '';

/**
 *  获取状态
 *
 * @param     string  $sta  状态ID
 * @return    string
 */

if($dopost=='')
{
    if($channel=='' & $arcrank==''){
	   $tiaojian=" WHERE mid='".$cfg_ml->M_ID."'";
	}else if($channel=='' & $arcrank!=''){
	   $tiaojian=" WHERE mid='".$cfg_ml->M_ID."' and arcrank='$arcrank'";
	}else if($channel!='' & $arcrank==''){
	   $tiaojian=" WHERE mid='".$cfg_ml->M_ID."'";
	}else{
	   $tiaojian=" WHERE mid='".$cfg_ml->M_ID."' and channel='$channel' and arcrank='$arcrank' ";
	}

	
    $sql = "SELECT * FROM `#@__archives` $tiaojian ORDER BY id DESC";
    $dlist = new DataListCP();
    $dlist->pageSize = 20;
    $dlist->SetTemplate(DEDEMEMBER."/templets/sucai.htm");    
    $dlist->SetSource($sql);
    $dlist->Display(); 
}